package main

import (
	"fmt"
	"os"

	"github.com/dgrijalva/jwt-go"
)

func main() {
	// Create the Claims
	claims := &jwt.StandardClaims{
		ExpiresAt: 1565681340210 + 1000*86500,
		Issuer:    "starnet",
		Audience:  "nanhu",
	}

	token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)
	k, err := token.SignedString([]byte("starnet2010"))
	if err != nil {
		fmt.Printf("err: %s\n", err)
		os.Exit(-1)
	}
	fmt.Printf("token: %s\n", k)
	os.Exit(0)
}
